<!DOCTYPE html>
<meta charset="utf-8">
<style>
#container {
  writing-mode: vertical-rl;
  font-size: 20px;
}
.tcy {
  text-combine-upright: all;
}
.no-autospace {
  text-autospace: no-autospace;
}
</style>
<div id="container">
  <div class="no-autospace">国<span class="tcy">XX</span>国</div>
  <div class="no-autospace">国<span class="tcy">11</span>国</div>
</div>
